<!DOCTYPE html>
<html>
<head>
    <title>提现记录</title>
    <include file="appapi@head"/>
    <link href='__STATIC__/appapi/css/cash.css?t=1555903036' type="text/css" rel="stylesheet">
</head>
<body>
     <div class="list">
        <ul>
            <volist name="list" id="v">
            <li>
                <div class="list_l">
                    <p><span><img class="coin" src="__STATIC__/appapi/images/coin.png"></span>{$v['votes']}</p>
                    <p class="money"><span>金额:</span>{$v['money']}</p>
                </div>
                <div class="list_r">
                    <p>{$v['status_name']}</p>
                    <p>{$v['addtime']}</p>
                </div>
            </li>
            </volist>
            <empty name="list">
            <div class="empty">
            </div>
            </empty>
        </ul>
    </div>
     <include file="appapi@footer"/>
     <include file="appapi@scripts"/>
      <script>
        var uid='{$uid}';
        var token='{$token}';
     	$(function(){
            function getlistmore(){
                $.ajax({
                    url:'/appapi/cash/more',
                    data:{'page':page,'uid':uid,'token':token},
                    type:'post',
                    dataType:'json',
                    success:function(data){
                        if(data.nums>0){
                            var nums=data.nums;
                            var list=data.list.data;
                            var html='';
                            for(var i=0;i<nums;i++){
                                var v=list[i];
                                html+='<li>\
                                    <div class="list_l">\
                                        <p><span><img class="coin" src="__STATIC__/appapi/images/coin.png"></span>'+v['votes']+'</p>\
                                        <p class="money"><span>金额:</span>'+v['money']+'</p>\
                                    </div>\
                                    <div class="list_r">\
                                        <p>'+v['status_name']+'</p>\
                                        <p>'+v['addtime']+'</p>\
                                    </div>\
                                </li>';
                            }
                            
                            $(".list ul").append(html);
                        }
                        
                        if(data.isscroll==1){
                            page++;
                            isscroll=true;
                        }
                    }
                })
            }
            

            var page=2; 
            var isscroll=true; 

            var scroll_obj=$(window);
            scroll_obj.scroll(function(){  
                    var srollPos = scroll_obj.scrollTop();    //滚动条距顶部距离(页面超出窗口的高度)  		
                    var totalheight = parseFloat(scroll_obj.height()) + parseFloat(srollPos);  
                    if(($(document).height()-50) <= totalheight  && isscroll) {  
                            isscroll=false;
                            getlistmore()
                    }  
            });  


        })
     </script>
</body>
</html>
